/*
 * @Author: yyyyjinying
 * @Date: 2024-07-30 21:59:32
 * @LastEditTime: 2024-07-30 22:39:15
 * @LastEditors: yyyyjinying
 * @Description:
 * @FilePath: /heima-shop/src/services/profile.ts
 * 可以输入预定的版权声明、个性签名、空行等
 */
import type { ProfileParams } from '@/types/profile'
import { request } from '@/utils/http'

/**
 * 获取个人信息
 */
export const getMemberProfileAPI = () => {
  return request({
    method: 'GET',
    url: '/member/profile',
  })
}

/**
 * 修改个人信息
 * @param data 请求体参数
 */
export const putMemberProfileAPI = (data: ProfileParams) => {
  return request<ProfileParams>({
    method: 'PUT',
    url: '/member/profile',
    data,
  })
}
